package org.jeecg.modules.manage.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.manage.entity.CaishuiBill;

import java.util.List;
import java.util.Map;

/**
 * @Description: 开票记录
 * @Author: yfkj
 * @Date:   2023-02-23
 * @Version: V1.0
 */
@InterceptorIgnore(tenantLine = "true")
public interface MCaishuiBillMapper extends BaseMapper<CaishuiBill> {


    /**
     * 查询开票总额
     * @param params
     * @return
     */
    public Map<String,Object> queryBillTotal(@Param("params") Map<String, String> params);

    /**
     * 最近7天开票统计
     * @return
     */
    public List<Map<String,Object>> last7DaysBillStatistics(@Param("params") Map<String, String> params);

    /**
     * 最近30天开票统计
     * @return
     */
    public List<Map<String,Object>> last30DaysBillStatistics(@Param("params") Map<String, String> params);

    /**
     * 最近一年开票统计
     * @return
     */
    public List<Map<String,Object>> lastOneYearBillStatistics(@Param("params") Map<String, String> params);

    /**
     * 查询开票中金额
     * @param businessId
     * @param companyId
     * @return
     */
    public double queryInAmount(@Param("businessId") String businessId, @Param("companyId") String companyId);

    /**
     * 查询已开票金额
     * @param businessId
     * @param companyId
     * @return
     */
    public double queryAlreadyAmount(@Param("businessId") String businessId, @Param("companyId") String companyId);

}
